﻿using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.TD;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.TD
{
    public partial interface ITD_SendBusiness
    {
        //Task<PageResult<TD_Send>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<TD_Send> GetTheDataAsync(string id);
        Task AddDataAsync(TD_Send data);
        Task UpdateDataAsync(TD_Send data);
        Task DeleteDataAsync(List<string> ids);
        /// <summary>
        /// 获取智能分配数据
        /// </summary>
        /// <param name="NoticeId"></param>
        /// <param name="Type"></param>
        /// <returns></returns>
        Task<DistributionDataAjaxResult> DistributionData(string NoticeId, StocktypeIn Type);
        Task<List<PickUpMaterialDTO>> AutomaticStockData(string NoticeId, StocktypeIn Stocktype);

       Task<List<PickUpMaterialDTO>> AutomaticStepsData(string NoticeItemId,string Steps, RetrievalSeach data);
    }

    /// <summary>
    /// 自动备货使用
    /// </summary>
    public class PickUpMaterialDTO
    {
        /// <summary>
        /// 发货通知单明细ID
        /// </summary>
        public String NoticeId { get; set; }

        /// <summary>
        /// 设计清单Id
        /// </summary>
        public String DesignId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public String MaterialId { get; set; }

        /// <summary>
        /// 设计数量
        /// </summary>
        public Double? Nums { get; set; }

        /// <summary>
        /// 应发数量
        /// </summary>
        public Double? RealNums { get; set; }

        /// <summary>
        /// 设计清单明细Id
        /// </summary>
        public String PB_DesignListInfo { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public Double? ScanNum { get; set; }

        /// <summary>
        /// 库存可用数量
        /// </summary>
        public Double? StockNumber { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public String CreateTime { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public String LocationId { get; set; }

        /// <summary>
        /// 仓库Id
        /// </summary>
        public String StorId { get; set; }

        /// <summary>
        /// 已备数量
        /// </summary>
        public Double? StockVolume { get; set; }

        /// <summary>
        /// 仓库名称
        /// </summary>
        public String StorageName { get; set; }

        /// <summary>
        /// 货位名称
        /// </summary>
        public String StorAreaName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public String MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public String MaterialSpec { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public String MaterialName { get; set; }

        /// <summary>
        /// 未备数量
        /// </summary>
        public Double? ShouldNumber { get; set; }

        /// <summary>
        /// 唯一值
        /// </summary>
        public String onlyId { get; set; }

        public Double? StepNumber { get; set; }
        public Double? ReadyNums { get; set; }
        public string ProductCode { get; set; }

        public string  StepIndex { get; set; }
        /// <summary>
        /// 理论重量
        /// </summary>
        public Double? Weight { get; set; }

        public string groupName { get; set; }
    }

    public class RetrievalSeach {
        /// <summary>
        /// 检索仓库
        /// </summary>
        public string StorId { get; set; }
        /// <summary>
        /// 检索物料
        /// </summary>
        public string Matername { get; set; }
        /// <summary>
        /// 是否有库存
        /// </summary>
        public string ThereisInventory { get; set; }

        /// <summary>
        /// 最大库存
        /// </summary>
        public Boolean? Another { get; set; }

    }
}